﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows.Media.Animation;
using System.Windows;

namespace GraduApplication.Controls
{
    public class HoverButton : Button
    {
        DoubleAnimation animation = new DoubleAnimation();
        Storyboard board = new Storyboard();

        public delegate void ClickHandler(object sender, EventArgs eventArgs);
        public new event ClickHandler Click;

        private Duration _duration;
        private readonly Duration ReverseDuration = new Duration(new TimeSpan(0, 0, 0, 1));

        public HoverButton()
        {
            animation.Completed += new EventHandler(animation_Completed);

            
        }

        void animation_Completed(object sender, EventArgs e)
        {
            if (Click != null)
            {
                Click(sender, e);
            }
        }

        protected override void OnMouseEnter(System.Windows.Input.MouseEventArgs e)
        {
            
            
            base.OnMouseEnter(e);
        }

        protected override void OnMouseLeave(System.Windows.Input.MouseEventArgs e)
        {
            base.OnMouseLeave(e);
        }
    }
}
